﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using CommonLibrary.DataModel.Basic;
using System.Collections.Generic;
using CommonLibrary.DataModel.WorkFlow;

namespace SharedWorkflows
{
    public sealed partial class 给叶老看看 : StateMachineWorkflowActivity
    {
        public 给叶老看看()
        {
            InitializeComponent();
        }

        public static DependencyProperty 提交结果Property = DependencyProperty.Register(
            "提交结果", typeof(string), typeof(给叶老看看));
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 提交结果
        {
            get
            {
                return ((string)(base.GetValue(给叶老看看.提交结果Property)));
            }
            set
            {
                base.SetValue(给叶老看看.提交结果Property, value);
            }
        }

        public static DependencyProperty 创建者Property = DependencyProperty.Register(
            "创建者", typeof(UserEntity), typeof(给叶老看看));
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public UserEntity 创建者
        {
            get
            {
                return (UserEntity)base.GetValue(给叶老看看.创建者Property);
            }
            set
            {
                base.SetValue(给叶老看看.创建者Property, value);
            }
        }

        public static DependencyProperty 流程名称Property = DependencyProperty.Register(
        "流程名称", typeof(string), typeof(给叶老看看));
        [BrowsableAttribute(true)]
        public string 流程名称
        {
            get
            {
                return (string)base.GetValue(给叶老看看.流程名称Property);
            }
            set
            {
                base.SetValue(给叶老看看.流程名称Property, value);
            }
        }

        public static DependencyProperty 工作流实例值集合Property = DependencyProperty.Register("工作流实例值集合", typeof(List<WfInsvalueEntity>), typeof(给叶老看看));
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public List<WfInsvalueEntity> 工作流实例值集合
        {
            get
            {
                return ((List<WfInsvalueEntity>)(base.GetValue(给叶老看看.工作流实例值集合Property)));
            }
            set
            {
                base.SetValue(给叶老看看.工作流实例值集合Property, value);
            }
        }

        public static DependencyProperty 实例IDProperty = DependencyProperty.Register("实例ID", typeof(Guid), typeof(给叶老看看));

        [DescriptionAttribute("实例ID")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public Guid 实例ID
        {
            get
            {
                return this.WorkflowInstanceId;
            }
            set
            {
                base.SetValue(给叶老看看.实例IDProperty, value);
            }
        }

        [BrowsableAttribute(true)]
        public int[] 下一步处理人 { set; get; }

        public int judgeArgs1 = 0;
        public int judgeArgs2 = 0;
        public int judgeArgs3 = 0;
        public int judgeArgs4 = 0;
        public int judgeArgs5 = 0;

        private void handleExternalEventActivity1_Invoked(object sender, ExternalDataEventArgs e)
        {
            ReceivedEventArgs eventArgs = e as ReceivedEventArgs;
            if (eventArgs.Fqrxx != null)
                创建者 = eventArgs.Fqrxx;
            if (eventArgs.Clrxxs != null)
                下一步处理人 = eventArgs.Clrxxs;
            流程名称 = eventArgs.TaskName;
            工作流实例值集合 = eventArgs.WivList;
        }

        private void callExternalMethodActivity1_MethodInvoking(object sender, EventArgs e)
        {
            this.callExternalMethodActivity1.ParameterBindings["instanceID"].Value = this.WorkflowInstanceId;
            this.callExternalMethodActivity1.ParameterBindings["wivList"].Value = this.工作流实例值集合;
        }
    }
}
